﻿@page
@model ChangePasswordModel
@{
    ViewBag.Title = AccountResources.ChangePassword;
}

<div id="edit-form">
    @if (Model.StatusMessage != null)
    {
        <div class="alert alert-success header">@Html.Raw(Model.StatusMessage)</div>
    }
    <form id="start-reset" autocomplete="off" asp-page="./ChangePassword">
        <div asp-validation-summary="All" class="text-danger"></div>

        <h1>@AccountResources.ChangePassword</h1>
        <div class="form-group">
            <input asp-for="Input.OldPassword" class="form-control" placeholder="@AccountResources.CurrentPassword"/>
            <span asp-validation-for="Input.OldPassword" class="text-danger help-inline"></span>
        </div>
        <div class="form-group">
            <input asp-for="Input.NewPassword" class="form-control" placeholder="@AccountResources.PasswordWatermark"/>
            <span asp-validation-for="Input.NewPassword" class="help-inline text-danger"></span>
        </div>
        <div class="form-group">
            <input asp-for="Input.ConfirmPassword" class="form-control" class="form-control" placeholder="@AccountResources.RepeatPassword"/>
            <span asp-validation-for="Input.ConfirmPassword" class="help-inline text-danger"></span>
        </div>
        <div class="form-group">
            <input class="wb-checkbox" id="ShowPassword" type="checkbox"
                   onclick="var oldPass = document.getElementById('Input_OldPassword');oldPass.type = (oldPass.type === 'text' ? 'password' : 'text'); var pass = document.getElementById('Input_NewPassword');pass.type = (pass.type === 'text' ? 'password' : 'text');var confirm = document.getElementById('Input_ConfirmPassword');confirm.type = (confirm.type === 'text' ? 'password' : 'text');">
            <label for="ShowPassword">
                <span></span>@AccountResources.ShowPassword
            </label>
        </div>
        <div class="form-actions">
            <input type="submit" class="btn btn-success btn-lg" value="@AccountResources.Change"/>
            <a asp-page="./questionnaire/my" class="btn">
                @QuestionnaireController.Cancel
            </a>
        </div>
    </form>
</div>


@section Scripts {
    <partial name="_ValidationScriptsPartial" />
}
